package com.example.mybatisplus.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mybatisplus.model.domain.Room;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisplus.model.dto.BedInfoDTO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lxp
 * @since 2024-07-17
 */
public interface RoomMapper extends BaseMapper<Room> {

//    List<Room> selectByIsEnabled(@Param("isEnabled") int isEnabled);
//
//    List<Room> selectByIsEnabledWithbed(@Param("isEnabled") int isEnabled);
//
//    List<Room> selectByIsEnableddetail(@Param("isEnabled") int isEnabled);

//    @Select("SELECT " +
//            "r.number AS roomNumber, " +
//            "r.price , " +
//            "r.floor , " +
//            "b.buildingName , " +
//            "a.areaName , " +
//            "bd.bedId AS bedNumber " +
//            "FROM room r " +
//            "JOIN building b ON r.Building_buildingId = b.buildingId " +
//            "JOIN area a ON b.Area_areaId = a.areaId " +
//            "JOIN bed bd ON bd.Room_roomId = r.roomId " +
//            "AND bd.Room_Building_buildingId = b.buildingId " +
//            "AND bd.Room_Building_Area_areaId = a.areaId " +
//            "WHERE r.isEnabled =0")
//
 // List<RoomInfoDTO> findDisabledRooms();
//  Page<BedInfoDTO> findDisabledBed(@Param("page")Page<BedInfoDTO> page, @Param("areaName") String areaName, @Param("buildingName") String buildingName, @Param("floor") String floor);
}
